package cn.strive.eams.scrap.controller;

import cn.strive.eams.base.response.JsonResult;
import cn.strive.eams.scrap.pojo.dto.ScrapQuery;
import cn.strive.eams.scrap.pojo.entity.Scrap;
import cn.strive.eams.scrap.pojo.vo.ScrapVO;
import cn.strive.eams.scrap.service.ScrapService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@Api(tags = "用户管理")
@RequestMapping("/v1/disposal")
public class ScrapController {
    @Autowired
    ScrapService scrapService;
    @GetMapping("/select")
    public JsonResult selectAll(ScrapQuery scrapQuery){
        log.debug("查询报废申请单: ScrapQuery={}",scrapQuery);
        List<ScrapVO> list =scrapService.selectAll(scrapQuery);
        return JsonResult.ok(list);
    }

}
